package com.fubowen.reader.db.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import com.fubowen.reader.db.bean.Document

@Dao
interface DocumentDao {
    @Query("select rowid,name,description,parentId,url,keywords from Document")
    fun all(): List<Document>

    @Query("select rowid,name,description,parentId,url,keywords from Document where name match :name")
    fun match(name: String): List<Document>

    @Insert
    fun set(bean: Document): Long

    @Insert
    fun set(bean: List<Document>)
}